package com.itheima.app;

import com.itheima.config.SpringConfig;
import com.itheima.dao.BookDao;
import com.itheima.service.UserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class App {
    public static void main(String[] args) {

        ApplicationContext app = new AnnotationConfigApplicationContext(SpringConfig.class);

        BookDao bookDao = app.getBean(BookDao.class);

//        bookDao.save();

        int div = bookDao.div(4,2);
        System.out.println(div);
//        //getUrl
//        UserService userService = app.getBean(UserService.class);
//        userService.getUrl("  http://www.itcast.cn  ","  1234  ");

    }
}
